package com.campus.entry;

import com.campus.constant.BusinessConstant;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ToString
@TableName("t_manager_activity")
public class ManagerActivity {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("name")
    private String name;

    @TableField("category")
    private String category;

    @TableField("title")
    private String title;

    @TableField("creator")
    private String creator;

    @TableField("abstract")
    private String abstractDesc;

    @TableField("detailed_desc")
    private String detailedDesc;

    @TableField("status")
    private Integer status;

    @TableField("created_time")
    @DateTimeFormat(pattern = BusinessConstant.TIME_FORMAT)
    @JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss")
    private LocalDateTime createdTime;

    @TableField("archived_time")
    @DateTimeFormat(pattern = BusinessConstant.TIME_FORMAT)
    @JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss")
    private LocalDateTime archivedTime;

    @TableField("pic_urls")
    private String picUrls;

    @TableField("start_time")
    @DateTimeFormat(pattern = BusinessConstant.TIME_FORMAT)
    @JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss")
    private LocalDateTime startTime;

    @TableField("end_time")
    @DateTimeFormat(pattern = BusinessConstant.TIME_FORMAT)
    @JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss")
    private LocalDateTime endTime;
}
